<%-- 
    Document   : callLogReports
    Created on : 13 Dec, 2012, 8:42:43 PM
    Author     : sagar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <%@include file="reportCommonHeader.jsp" %>
        <div class="in_02">
            <h1>Call Log Report </h1>
            <table border="0"  style="padding-left:1000px;">
                <tr><td>
                          
                        &nbsp;&nbsp;&nbsp;<p style="float: right;padding-right: 50px;padding-top: 10px;">
                            <a href="#" onclick="document.formExcel.submit()">
                                <img src="../images/Excel.png" alt="Download excel file" border="0" />
                            </a>
                        </p> 
                      <p style="float: right;padding-right: 20px; padding-top: 10px;"><c:out value="${fn:length(data)}"/> <spring:message code="rowsFound"/></p>
                    </td>

                </tr>
            </table>

            
            <table border="1px" class="data_table">
                <thead>
                    <tr class="header">
                        <th width="50px"><spring:message code="empId"/></th>
                        <th width="100px"><spring:message code="customerName"/></th>
                        <th width="100px"><spring:message code="customerType"/></th>
                        <th width="100px"><spring:message code="phone1"/></th>
                        <th width="100px">Phone 2</th>
                        <th width="50px"><spring:message code="mrNo"/></th>
                        <th width="50px"><spring:message code="relation"/></th>
                        <th width="120px"><spring:message code="callType"/></th>
                        <th width="180px"><spring:message code="dispositionName"/></th>
                        <th width="60px"><spring:message code="status"/></th>
                        <th width="100px"><spring:message code="followupDate"/></th>
                        <th width="100px"><spring:message code="lastModifiedDate"/></th>
                        <th width="100px"><spring:message code="doctorName"/></th>
                        <th width="80px"><spring:message code="lastModifiedBy"/></th>
                        <th width="150px"><spring:message code="cheifComplaint"/></th>
                        <th width="100px"><spring:message code="assignedTo"/></th>
                        <th width="100px"><spring:message code="callRecordingID"/></th>
                        <th>Edit</th>
                </thead>

                <tbody>
                    <c:forEach items="${data}" var="data">
                        <c:choose>
                            <c:when test="${data.important==true}">
                                <tr style="background-color:#FDB543;">
                                    <td align="center"><c:out value="${data.EMP_ID}"/></td>
                                    <td align="center"><c:out value="${data.CUSTOMER_NAME}"/></td>
                                    <td align="center"><c:out value="${data.PAYMENT_TYPE_NAME}"/></td>
                                    <td align="center"><c:out value="${data.PHONE_1}"/></td>
                                    <td align="center"><c:out value="${data.PHONE_2}"/></td>
                                    <td align="center"><c:out value="${data.MR_NO}"/></td>
                                    <td align="center"><c:out value="${data.RELATION_NAME}"/></td>
                                    <td align="center"><c:out value="${data.CALL_TYPE_NAME}"/></td>
                                    <td align="center"><c:out value="${data.DISPOSITION_NAME}"/></td>
                                    <td align="center"><c:out value="${data.STATUS}"/></td>
                                    <td align="center"><fmt:formatDate pattern="dd-MM-yyyy" value="${data.FOLLOWUP_DATE}"/></td>
                                    <td align="center"><fmt:formatDate pattern="dd-MM-yyyy HH:mm" value="${data.LAST_MODIFIED_DATE}"/></td>
                                    <td align="center"><c:out value="${data.DOCTOR_NAME}"/></td>
                                    <td align="center"><c:out value="${data.USERNAME}"/></td>
                                    <td align="center"><c:out value="${data.CHEIF_COMPLAINT}"/></td>
                                    <td align="center"><c:out value="${data.ASSIGNED_TO}"/></td>
                                    <td align="center"><c:out value="${data.CALL_RECORDING_ID}"/></td>
                                    
                                    <td><a href="../customer/editCustomer.htm?customerId=<c:out value="${data.CUSTOMER_ID}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>
                                </tr>
                            </c:when>
                            <c:otherwise>
                                <tr>
                                    <td align="center"><c:out value="${data.EMP_ID}"/></td>
                                    <td align="center"><c:out value="${data.CUSTOMER_NAME}"/></td>
                                    <td align="center"><c:out value="${data.PAYMENT_TYPE_NAME}"/></td>
                                    <td align="center"><c:out value="${data.PHONE_1}"/></td>
                                    <td align="center"><c:out value="${data.PHONE_2}"/></td>
                                    <td align="center"><c:out value="${data.MR_NO}"/></td>
                                    <td align="center"><c:out value="${data.RELATION_NAME}"/></td>
                                    <td align="center"><c:out value="${data.CALL_TYPE_NAME}"/></td>
                                    <td align="center"><c:out value="${data.DISPOSITION_NAME}"/></td>
                                    <td align="center"><c:out value="${data.STATUS}"/></td>
                                    <td align="center"><fmt:formatDate pattern="dd-MM-yyyy" value="${data.FOLLOWUP_DATE}"/></td>
                                    <td align="center"><fmt:formatDate pattern="dd-MM-yyyy HH:mm" value="${data.LAST_MODIFIED_DATE}"/></td>
                                    <td align="center"><c:out value="${data.DOCTOR_NAME}"/></td>
                                    <td align="center"><c:out value="${data.USERNAME}"/></td>
                                    <td align="center"><c:out value="${data.CHEIF_COMPLAINT}"/></td>
                                    <td align="center"><c:out value="${data.ASSIGNED_TO}"/></td>
                                    <td align="center"><c:out value="${data.CALL_RECORDING_ID}"/></td>
                                    <td><a href="../customer/editCustomer.htm?customerId=<c:out value="${data.CUSTOMER_ID}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>  
                                </tr> 
                            </c:otherwise>
                        </c:choose>
                    </c:forEach>
                </tbody>

            </table>

            &nbsp;&nbsp;&nbsp;<c:out value="${fn:length(data)}"/> <spring:message code="rowsFound"/>
            <br/><br/><br/>
        </div>
        <form name="formExcel" method="post" action="reportExcel.htm">
            <input type="hidden" name="startDate" value="${startDate}"/>
            <input type="hidden" name="stopDate" value="${stopDate}"/>
            <input type="hidden" name="callTypeId" value="${callTypeId}"/>
            <input type="hidden" name="dispositionId" value="${dispositionId}"/>
            <input type="hidden" name="doctorId" value="${doctorId}"/>
            <input type="hidden" name="userId" value="${userId}"/>
        </form>
    </body>
</html>
